һ:
<%
set msg = Server.CreateOBject("JMail.Message") 'һMessage
msg.Charset = "GB2312" 'ʼֱΪ
msg.From = "nmgtltest@163.com" '
msg.FromName = "" '
msg.MailServerUserName="nmgtltest"  '˵¼
msg.MailServerPassWord="nmgtest"   '
msg.AddRecipient (request("shoujianren"))   '
msg.Subject = request("zhuti")  '
msg.Body = request("neirong") 'ʼ
msg.Send( "smtp.163.com" )  '͵ʼ
set msg=nothing  'ͷŶ
response.write "ʼͳɹ" 
%>

<% @language=vbscript codepage=936 %>
<%OPTION EXPLICIT%>
<!--#include FILE="upfile_class.asp"-->
<%
dim SavePath
dim upfile,formPath,ServerPath,FSPath,formName,FileName,oFile,upfilecount 'ҳеб
dim msg,strJS
SavePath="UploadSoft"
msg = ""
upfilecount=0
if right(SavePath,1)<>"/" then
	SavePath=SavePath&"/" 
end if
set upfile=new upfile_class ''ϴ
upfile.AllowExt="rar;zip;"	'ϴ͵
upfile.GetData (10240000)   'ȡϴ,ϴ10M
%>
<html>
<head>
<title>ļϴ</title>
<style type="text/css">
<!--
BODY{
BACKGROUND-COLOR: #E1F4EE;
font-size:9pt
}
.tx1 { height: 20px;font-size: 9pt; border: 1px solid; border-color: #000000; color: #0000FF}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="8">  
<%
if upfile.isErr then  '
    select case upfile.isErr
	case 1
	msg =  "ûϴļ"
	case 2
	msg =  "ϴļǵ,10M"  
	end select
	else
	FSPath=GetFilePath(Server.mappath("upfile.asp"),"\")'ȡõǰļڷ·
	ServerPath=GetFilePath(Request.ServerVariables("HTTP_REFERER"),"/")'ȡվϵλ
	for each formName in upfile.file 'гϴ˵ļ
	strJS="<SCRIPT language=javascript>" & vbcrlf
	   set oFile=upfile.file(formname)
	  FileName = upfile.getNewFileName()
				FileName=SavePath&FileName&oFile.filename
		 upfile.SaveToFile formname,FSPath&FileName   ''ļ ҲʹAutoSave,һ,ǻԶµļ
    if upfile.iserr then 
	 strJS=strJS & "alert('" & upfile.errmessage & "');" & vbcrlf
		strJS=strJS & "history.go(-1);" & vbcrlf
		else
		upfilecount=upfilecount+1
		Response.Write("ϴɹСΪ" & cstr(round(oFile.fileSize/1024)) & "K")
		strJS=strJS & "parent.document.UploadSoft.DownloadUrl.value='" & fileName & "';" & vbcrlf
		strJS=strJS & "parent.document.UploadSoft.SoftSize.value='" & cstr(round(oFile.fileSize/1024)) & "';" & vbcrlf
		end if
		strJS=strJS & "</script>" & vbcrlf
		response.write strJS
	 set oFile=nothing
	next
end if
set upfile=nothing  'ɾ˶
%>
</body>
</html>
<%
function GetFilePath(FullPath,str)
  If FullPath <> "" Then
    GetFilePath = left(FullPath,InStrRev(FullPath, str))
    Else
    GetFilePath = ""  
End If  
 End function
%>

<%OPTION EXPLICIT%>
<!--#include FILE="upfile_class.asp"-->
<%
dim SavePath
dim upfile,formPath,ServerPath,FSPath,formName,FileName,oFile,upfilecount
dim msg,strJS
SavePath="UploadSoftPic/"
msg = ""
upfilecount=0
set upfile=new upfile_class 'ϴ
upfile.AllowExt="jpg;png;gif;bmp"	'ϴ͵
upfile.GetData (10240000)   'ȡϴ,ϴ10M
%>
<html>
<head>
<title>ļϴ</title>
<style type="text/css">
<!--
BODY{
BACKGROUND-COLOR: #E1F4EE;
font-size:9pt
}
.tx1 { height: 20px;font-size: 9pt; border: 1px solid; border-color: #000000; color: #0000FF}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body leftmargin="0" topmargin="8">
<%
if upfile.isErr then  '
    select case upfile.isErr
	case 1
	msg =  "ûϴļ"
	case 2
	msg =  "ϴļǵ,10M"
	end select
	else
	FSPath=GetFilePath(Server.mappath("upfile.asp"),"\")'ȡõǰļڷ·
	ServerPath=GetFilePath(Request.ServerVariables("HTTP_REFERER"),"/")'ȡվϵλ
	for each formName in upfile.file 'гϴ˵ļ
	strJS="<SCRIPT language=javascript>" & vbcrlf  
	   set oFile=upfile.file(formname) 'upfile_classfileһļ
	  FileName = upfile.getNewFileName()
	 FileName=SavePath&FileName&oFile.filename
		 upfile.SaveToFile formname,FSPath&FileName   ''ļ ҲʹAutoSave,һ,ǻԶµļ
    if upfile.iserr then 
		strJS=strJS & "alert('" & upfile.errmessage & "');" & vbcrlf
		strJS=strJS & "history.go(-1);" & vbcrlf
		else
		upfilecount=upfilecount+1
	Response.Write("ͼƬϴɹͼƬСΪ" & cstr(round(oFile.fileSize/1024)) & "K")
	strJS=strJS & "parent.document.UploadSoft.SoftPicUrl.value='" & fileName & "';" & vbcrlf
		end if
		strJS=strJS & "</script>" & vbcrlf
		response.write strJS
	 set oFile=nothing
	next
end if
set upfile=nothing  'ɾ˶
%>
</body>
</html>
<%
function GetFilePath(FullPath,str)
  If FullPath <> "" Then
    GetFilePath = left(FullPath,InStrRev(FullPath, str))
    Else
    GetFilePath = ""
  End If
End function
%>
ģ

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
 <!--#include file="Connections/coon.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>addupload</title>
</head>
<body>
<%
dim name1,sex,year1,month1,major,class1,picture,soft,Recordset1
name1=request.Form("name")
sex=request.Form("sex")
year1=request.Form("year")
month1=request.Form("month")
major=request.Form("major")
picture=request.Form("SoftPicUrl")
soft=request.Form("DownloadUrl")
class1=request.form("class")
Set Recordset1 = Server.CreateObject ("ADODB.recordset")
sql= "SELECT * FROM 1 "
Recordset1.open sql,MM_coon_STRING,3,3
Recordset1.addnew
Recordset1("name")=name1
Recordset1("sex")=sex
Recordset1("year")=year1
Recordset1("month")=month1
Recordset1("major")=major
Recordset1("class")=class1
Recordset1("picture")=picture
Recordset1("soft")=soft
Recordset1("class")=class1
Recordset1.update
Recordset1.Close
set Recordset1=nothing
response.write("ϴɹ")
%>
</body>
</html >
壺

<%
 set msg = Server.CreateOBject("JMail.Message") 
msg.Charset = "GB2312" 'ʼֱΪ
msg.From = "nmgtltest@163.com" '
msg.FromName = "" '
msg.MailServerUserName="nmgtltest"  '˵¼
msg.MailServerPassWord="nmgtest"   '
msg.AddRecipient (request("shoujianren"))   '
msg.Subject = request("zhuti")  '
msg.Body = request("neirong") 'ʼ
msg.AddAttachment( Server.MapPath(request.form("DownloadUrl"))) 
msg.Send( "smtp.163.com" )
set msg=nothing
response.write "ʼͳɹ"
%>
